Skip to content

Add per-sensor temperature alert thresholds - #2197

Closed
VACInc wants to merge 1 commit into
henrygd:mainfrom
VACInc:agent/per-probe-temperature-alerts
Closed

VACInc wants to merge 1 commit into
henrygd:mainfrom
VACInc:agent/per-probe-temperature-alerts

Conversation

@VACInc

@VACInc VACInc commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #2446

GitHub rejected reopening this closed PR. The verified, rebased implementation is now open at #2446. This closure was in error, not a withdrawal of the feature.

Summary

Replacement for #2197: the earlier closure was in error, not a withdrawal of the feature. GitHub rejected reopening the original PR after the refreshed branch was pushed, so this replacement carries the verified update. Rebased onto upstream 65f00ae119269113613a39028b7a935693b860e6, including the new active-alert banner.

  • Preserve Any sensor as the default, with the existing shared threshold and dashboard-temperature fallback.
  • Add selectable individual temperature sensors with independently persisted thresholds, synchronized pointer/keyboard sliders and validated numeric inputs.
  • Keep saved missing sensors editable; fall back to Any sensor when the last selection is removed. Unselected sensors are ignored in individual mode.
  • Carry thresholds through collection migration, API, cache, copy-from, reload, and active-alert descriptions. Global overwrite returns systems to a shared threshold; without overwrite, existing per-sensor settings remain unchanged.
  • Evaluate immediate and sustained alerts per sensor, including independent sample counts. Missing/invalid/insufficient selected sensor readings cannot falsely report recovery, while an available hot sensor can still trigger.
  • Preserve upstream CPU-state, battery, ZFS, and network-monitor behavior, including zero-valued network-loss thresholds.
  • Forward slider accessible labels to the actual focusable thumb.

Verification

  • go test -tags 'testing no_ui' ./... -count=1 -timeout 180s
  • go test -race -tags 'testing no_ui' ./internal/alerts -run 'Test(SelectTemperature|Temperature|SystemAlertsCache)' -count=1 -timeout 180s
  • bun test in internal/site: 29 tests, 114 assertions.
  • bunx tsc --noEmit and bun run build in internal/site.
  • Real isolated Camoufox/Playwright E2E against the production-built hub, using synthetic local data: 13 checks covering dashboard/dialog navigation, actual pointer drag, keyboard and numeric synchronization, validation/clamping, database persistence and full reload, copy-from, global preserve/overwrite, empty/missing sensor data, and the new active-alert banner/sheet. No browser page errors. Final hub build identifies commit 05c791bcc63571f4395182b55f8ebc5e0304d11d with vcs.modified=false.
  • Independent final Codex code review of the exact diff: no actionable findings. Its earlier partial-sensor recovery finding was fixed with immediate and sustained regression tests.

Test environment note

The full normal Go suite and focused race suite use PocketBase's no_ui build tag to avoid an existing test-harness duplicate registration of GET /_/extensions.js when reusing API scenarios. This does not replace UI testing: browser E2E used the normal production UI build without no_ui. The broader alerts race run detected a race in TestAlertSilencedWithActualAlert and exceeded its 180-second limit. The same race reproduces on pristine upstream 65f00ae1 with go test -race -tags 'testing no_ui' ./internal/alerts -run '^TestAlertSilencedWithActualAlert$' -count=1 -timeout 90s; it is outside this feature diff. Feature-focused race tests pass. No production data, deployment changes, or private integration code are included.

@VACInc

VACInc commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Opened against upstream in error; this change belongs in our internal repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant